package KK.Data
{
	import KK.Type.Bytes;
	
	import flash.net.SharedObject;
	import flash.utils.ByteArray;

	public class TempData
	{
		private var so:SharedObject
		private var status:int;//状态
		public function TempData()
		{
			init();
		}
		private function init():void{ 
			
		}
		
		//打开空间 
		public function OpenSpace(name:String):void{
			so=SharedObject.getLocal(name);
		}
		//写入数据
		public function Write(key:String,byte:Bytes):void{
			so.data[key]=byte; 
		}
		
		public function WriteInt(key:String,value:int):void{
			so.data[key]=value; 
		}
		public function ReadInt(key:String):int{
			return so.data[key];
		}
		//读取键值
		public function Read(key:String):ByteArray{
			return so.data[key];
		}
		 
	}
}